import serve from './index'
// 按需导出

// 获取页码数
export function getPages(courseName, studentName, className) {
    return serve({
        url: '/admin/student/course/page/count',
        method: 'get',
        params: {
            className: className,
            courseName: courseName,
            studentName: studentName
        }
    })
}

// 获取学生们
export function getStudents() {
    return serve({
        url: '/admin/student/names',
        method: 'get',
    })
}

// 获取课程们
export function getClass() {
    return serve({
        url: '/admin/course/names',
        method: 'get',
    })
}


// 搜索
export function getList(page, courseName, studentName, className) {
    return serve({
        url: '/admin/student/course/page/' + page,
        method: 'get',
        params: {
            className: className,
            courseName: courseName,
            studentName: studentName
        }
    })
}

// 编辑获取
export function editList(id) {
    return serve({
        url: '/admin/student/course/' + id,
        method: 'get',
    })
}


// 添加
export function ADDList(data) {
    return serve({
        url: '/admin/student/course',
        method: 'post',
        data: data
    })
}

// 更改
export function changeorno(data) {
    return serve({
        url: '/admin/student/course',
        method: 'put',
        data: data
    })
}

// 删除
export function deleted(id) {
    return serve({
        url: '/admin/student/course/' + id,
        method: 'delete',
    })
}